#ifndef CSUGL_VERTEX_ARRAY_H
#define CSUGL_VERTEX_ARRAY_H
#include "../core/core.h"

#include <vector>

namespace csugl {

    struct BufferLayout;
    class VertexBuffer;
    class IndexBuffer;

    class VertexArray {
    public:
        VertexArray();

        ~VertexArray();

        unsigned int getID() const { return id; }

        void addVertexAttribution(Ref<VertexBuffer> vb, const BufferLayout &layout);

        void bindIndexBuffer(Ref<IndexBuffer> ib);

        void bind() const;
        void un_bind() const;

    private:
        unsigned int id;
        size_t attri_count;

    public:
        static Ref<VertexArray> Creat();
    };

}

#endif